#include <iostream>
#include <vector>
#include <string>
#include <list>
#include <algorithm>
#include <numeric>
#include <functional>
#include <iterator>
#include <fstream>
#include "TestSalesData.cpp"
using namespace std;
using namespace std::placeholders;
void practice_10_27();
void practice_10_28();
void example_p359();
int main()
{
	//practice_10_27();
	//practice_10_28();
	example_p359();
	return 0;
}
void practice_10_27()
{
	vector<string> vec{"fox","cat","dog","the","fox","dog","dog","cat"};
	list<string> lst;
	unique_copy(vec.begin(),vec.end(),back_inserter(lst));
	for(const auto &s:lst)cout<<s<<" ";
}
void practice_10_28()
{
	vector<int> vec{1,2,3,4,5,6,7,8,9};
	list<int> lst;
	list<int> lst1;
	list<int> lst2;
	copy(vec.begin(),vec.end(),inserter(lst,lst.begin()));
	copy(vec.begin(),vec.end(),front_inserter(lst1));
	copy(vec.begin(),vec.end(),back_inserter(lst2));
	for(const auto &s:lst)cout<<s<<" ";
	cout<<endl;
	for(const auto &s:lst1)cout<<s<<" ";
	cout<<endl;
	for(const auto &s:lst2)cout<<s<<" ";
	cout<<endl;
}
void example_p359()
{
	istream_iterator<int> it(cin);
	istream_iterator<int> eof;
	while(it!=eof)
		cout<<*it++<<" ";
	cout<<endl;
}
void example_p362()
{
	//ifstream input("Sales_Item.txt");
	istream_iterator<int> iter(cin),eof;
	ostream_iterator<int> oter(cout,"\n");
	while(iter!=eof)
	{
		int sales=*iter++;
		oter=sales;
	}
}